Skip to content

Conversation

@pacmancoder
Copy link
Contributor

@pacmancoder pacmancoder commented Nov 11, 2025

Adds fire-and-forget remote execution via the now proto DVC.

Previously, all execution types (except Run) waited for the process exit code and tracked the execution session, but this behavior is not always what the user expects. This PR changes that and adds an option to specify if fire and forget mode is needed (return result right after process is spawned).

Issue: ARC-411

@pacmancoder pacmancoder requested a review from Copilot November 11, 2025 12:13
@github-actions
Copy link

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

Copilot finished reviewing on behalf of pacmancoder November 11, 2025 12:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a detached execution mode for the agent's process execution functionality, allowing fire-and-forget process launches without IO redirection or active session management.

Key changes:

  • Added run_detached() method to spawn processes that run independently without IO monitoring
  • Refactored WinApiProcessCtx to remove the stored io_notification_tx field, passing it as a parameter instead
  • Implemented console window hiding for all spawned processes (not just detached ones)

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
devolutions-session/src/dvc/task.rs Added detached mode handling in four message processors (exec_process, exec_batch, exec_winps, exec_pwsh), checking is_detached() flag and calling run_detached() instead of normal execution flow
devolutions-session/src/dvc/process.rs Refactored WinApiProcessCtx to pass io_notification_tx as parameter; added run_impl() and run_detached() methods; implemented console window hiding via SW_HIDE flag
devolutions-session/Cargo.toml Updated now-proto-pdu dependency to use git branch feat/exec-detached instead of crates.io version
Cargo.lock Updated lockfile with new now-proto-pdu version from git and resolved transitive dependency versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI commented Nov 11, 2025

@pacmancoder I've opened a new pull request, #1568, to work on those changes. Once the pull request is ready, I'll request review from you.

@Devolutions Devolutions deleted a comment from Copilot AI Nov 11, 2025
@pacmancoder pacmancoder force-pushed the feat/exec-detached branch 2 times, most recently from e535c79 to 92b4dd5 Compare November 18, 2025 11:36
@pacmancoder pacmancoder changed the title feat(agent): implement exec detached mode feat(agent): implement DVC remote exec detached mode Nov 18, 2025
@pacmancoder pacmancoder force-pushed the feat/exec-detached branch 2 times, most recently from bc9511c to 1a880f3 Compare November 24, 2025 12:35
@pacmancoder
Copy link
Contributor Author

CI fails because of an unrelated test failure

@pacmancoder pacmancoder requested a review from CBenoit November 24, 2025 12:53
@pacmancoder pacmancoder marked this pull request as ready for review November 24, 2025 12:53
Copy link
Member

@CBenoit CBenoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

For the failed test, you can now rebase on top of master where this is fixed.

Before merging, please apply the PR guidelines: https://github.com/Devolutions/devolutions-gateway/blob/master/AGENTS.md#pull-request-guidelines

I’ll let you wrap up and merge 🙂

@pacmancoder pacmancoder enabled auto-merge (squash) November 25, 2025 14:53
@pacmancoder pacmancoder merged commit 1417db9 into master Nov 25, 2025
40 checks passed
@pacmancoder pacmancoder deleted the feat/exec-detached branch November 25, 2025 15:00
@CBenoit
Copy link
Member

CBenoit commented Nov 26, 2025

Hi @pacmancoder

Small heads-up to avoid the markdown link in the footer:
image

The changelog generator consume everything on the right of Isssue:, and will create the link for us. If you pre-format with a link, it will generate something like:

[[ARC-411](https://devolutions.atlassian.net/browse/ARC-411)](https://devolutions.atlassian.net/browse/[ARC-411](https://devolutions.atlassian.net/browse/ARC-411))

Resulting into this:

[ARC-411](https://devolutions.atlassian.net/browse/[ARC-411](https://devolutions.atlassian.net/browse/ARC-411))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants